<?php 
$weekarr = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
$week = $weekarr[date("w")];
?>
<div id="intermediary" class="indexcontentdiv">
    <div class="positiondiv">
        <table>
            <tr>
                <td class="td-left">
                    <img src="<?=base_url()?>resource/img/home_ico.png" width="21" height="17">
                    Setting > <a href="<?=base_url()?>user/index">User</a> > New User
                </td>
                <td class="td-right">
                    <img src="<?=base_url()?>resource/img/menu2.png" width="27" height="24">Today is <?=$week?>,<?=date('M d,Y')?>
                </td>
            </tr>
        </table>
    </div>
    <div class="input-div">
        <?php echo form_open('user/new_user'); ?>
        <table>
            <tr><td></td><td><span class="err"><?=validation_errors();?></span></td></tr>
            <tr><td colspan="2"><h3>.User</h3></td></tr>
            <tr><td class="nametd">Username:</td><td><input type="text" name="username"/></td></tr>
            <tr><td class="nametd">Password:</td><td><input type="text" name="password"/></td></tr>
            <tr><td class="nametd">Role:</td><td>
                    <select name="role" id="role" style="width:140px;">
                        <!--<option value="0">Manager-->
                        <option value="1">Employee
                    </select>
                </td></tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" value="Save"/>
                    <input type="button" value="Reset"/>
                </td>
            </tr>
        </table>
        <?php echo form_close(); ?>
    </div>
</div>
<script>
$("input[type='button']").click(function(){
    $("input[name='username']").val('');
    $("input[name='password']").val('');
    $("#role").val(0);
});
</script>
　